<!--
 * @Author: coman
 * @LastEditors: coman
 * @Date: 2020-06-09 18:49:58
 * @motto: No pain,No gain
 * @LastEditTime: 2020-06-09 18:57:05
--> 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var sum= 10;
        var i =1;
        var count = 0;
        while(i<=10){
        var sum = sum*1.05;
        count=count+sum;
        i++;
        }
        console.log("10年后的月薪为"+sum+"总收入为:"+count);
        
    </script>
</body>
</html>